﻿namespace Ayatta.Contract.Domain
{
    /// <summary>
    /// 用户账户
    /// </summary>
    public class UserAccount : IEntity<int>
    {
        /// <summary>
        /// 用户Id
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 赠送的金额 通过充值大礼包及各种途径获赠送的金额
        /// </summary>
        public decimal GiftCurrency { get; set; }

        /// <summary>
        /// 被冻结的金额 提现时冻结的资金
        /// </summary>
        public decimal FreezeCurrency { get; set; }

        /// <summary>
        /// 通过充值获得的总金额
        /// </summary>
        public decimal RechargeCurrency { get; set; }

        /// <summary>
        /// 通过交易获得的总金额
        /// </summary>
        public decimal TransactionCurrency { get; set; }

        /// <summary>
        /// 拍币
        /// </summary>
        public int BidCurrency { get; set; }

        /// <summary>
        /// 免费拍币
        /// </summary>
        public int FreeBidCurrency { get; set; }

        /// <summary>
        /// 临时拍币 每天会清除
        /// </summary>
        public int TempBidCurrency { get; set; }

        /// <summary>
        /// 积分
        /// </summary>
        public int IntegralCurrency { get; set; }

        /// <summary>
        /// 临时积分 每天会清除
        /// </summary>
        public int TempIntegralCurrency { get; set; }

        /// <summary>
        /// 扩展信息
        /// </summary>
        public string Extra { get; set; }

        /// <summary>
        /// 帐号状态 1 可用 0不可用
        /// </summary>
        public bool Status { get; set; }

        /// <summary>
        /// 版本号
        /// </summary>
        public byte[] Version { get; set; }

        /// <summary>
        /// 可用金额
        /// </summary>
        public decimal AvailableCash { get { return (TransactionCurrency + RechargeCurrency + GiftCurrency) - FreezeCurrency; } }
    }
}